import 'package:cotton_candy/notifier/theme_notifier.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

class CottonCandyText extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    Size size = MediaQuery.of(context).size;
    ThemeNotifier notifier = context.watch();
    Gradient gradient = LinearGradient(
      colors: [notifier.primaryColor, notifier.gradientToColor],
    );
    Shader shader =
        gradient.createShader(Rect.fromLTRB(0, 0, size.width, size.height));
    return Column(
      children: [
        Text(
          '猕猴桃',
          style: TextStyle(
              height: 1,
              fontSize: 50,
              fontWeight: FontWeight.bold,
              foreground: Paint()..shader = shader,
              letterSpacing: 6),
        ),
        Text(
          '一个没啥用的app',
          style: TextStyle(
              height: 1,
              fontSize: 14,
              fontWeight: FontWeight.bold,
              foreground: Paint()..shader = shader,
              letterSpacing: 5.6),
        ),
      ],
    );
  }
}
